#Cmake最小版本
CMAKE_MINIMUM_REQUIRED(VERSION 3.5)

SET(PROJECT_NAME ImageCatcher)
project(${PROJECT_NAME})
SET(CMAKE_BUILD_TYPE RELEASE)
#SET(CMAKE_BUILD_TYPE DEBUG)
SET(CMAKE_CXX_STANDARD 11)

#可执行文件生成路径
SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE ${PROJECT_SOURCE_DIR}/build)

#找到OpenCV包
#set(OpenCV_DIR D:/OpenCV4/opencv/mingw_build/install)
FIND_PACKAGE(OpenCV REQUIRED)

#引用库
INCLUDE_DIRECTORIES(Include)
INCLUDE_DIRECTORIES(${OpenCV_INCLUDE_DIRS})
#include_directories(D:\\eigen-3.4.0)
#INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/Include/eigen-3.3.7)
INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/Include)


#生成指定目标
FILE(GLOB SOURCE_FILES
        "${PROJECT_SOURCE_DIR}/*.h"
        "${PROJECT_SOURCE_DIR}/*.cpp")
ADD_EXECUTABLE(${PROJECT_NAME} ${SOURCE_FILES})

#将第三方的库链接到可执行文件
TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${OpenCV_LIBS})
TARGET_LINK_LIBRARIES(${PROJECT_NAME} "/opt/HuarayTech/MVviewer/lib/libMVSDK.so")
TARGET_LINK_LIBRARIES(${PROJECT_NAME} "/opt/HuarayTech/MVviewer/module/USBDriver/libModule/libu3v-core.a")
#TARGET_LINK_LIBRARIES(${PROJECT_NAME} "/opt/DahuaTech/MVviewer/lib/libMVSDK.so")
#TARGET_LINK_LIBRARIES(${PROJECT_NAME} "/opt/DahuaTech/MVviewer/module/USBDriver/libModule/libu3v-core.a")
